<?php if ($this->pageCount): ?> 
<div class="pagination">
    <p class="a">Znaleziono <b><?php print $this->totalItemCount?></b> wizytówek. Strona <b><?php print $this->current?></b> z <b><?php print $this->pageCount ?></b></p>
    <p class="b">
        <!-- Previous page link -->
        <?php if (isset($this->previous)): ?>
        <a href="<?= $this->url(array('page' => $this->previous)) . "?$this->valuesQuery"; ?>"><span class="prev">&lt; Poprzedni</span></a>
        <?php else: ?>
        <span class="prev disabled">&lt; Poprzedni</span>
        <?php endif; ?>

        <!-- Numbered page links -->
        <?php foreach ($this->pagesInRange as $page): ?>
        <?php if ($page != $this->current): ?>
        <a href="<?= $this->url(array('page' => $page)) . "?$this->valuesQuery"; ?>"><?= $page; ?></a>
        <?php else: ?>
        <span class="selected"><?= $page; ?></span>
        <?php endif; ?>
        <?php endforeach; ?>

        <!-- Next page link -->
        <?php if (isset($this->next)): ?>
        <a href="<?= $this->url(array('page' => $this->next)) . "?$this->valuesQuery"; ?>"><span class="next">Następny &gt;</span></a>
        <?php else: ?>
        <span class="next disabled">Następny &gt;</span>
        <?php endif; ?>
    </p>
</div>
<?php endif; ?>